pkfanonfandomcom-20200213-history
Pikifen/Object categories/Pikmin
The Pikmin are the creatures the player controls. They can carry, fight, multiply, get eaten, etc. Examples: Red Pikmin, Yellow Pikmin, Purple Pikmin, etc. To create a new type of Pikmin, please follow the creating object types tutorial. Overview The Pikmin are programmed to do a lot of things in the engine, and the player can edit several of their attributes to create Pikmin resistant to various things, and with different strengths and weaknesses. Pikmin type objects are hardcoded in the engine to be shot out as a seed from an Onion, be a sprout on the floor, get plucked by a leader, follow a leader in a formation, be thrown, get dismissed, idle, chase an opponent, sigh when giving up on something, carry something, return to a pile of carriable objects, attacking while on the floor or latched on, be grabbed by an enemy, get knocked down, become paralyzed, flail around, panic around, drink a drop, and carry a tool. Pretty much all of the Pikmin's behavior comes from what is in the engine's code, and is too complex to do via scripting, so Pikmin do not support user-made scripting. Attributes Besides the global object type attributes, a Pikmin type requires the following attributes: *'icon_leaf': Name of the image with the Pikmin type's icon for when it is a leaf. This is displayed on the HUD, for the standby Pikmin bubble. The image should be in Game_data/Graphics, and the extension of the file name must be included. *'icon_bud': Same as icon_leaf, but for a bud. *'icon_flower': Same as icon_leaf, but for a flower. *'top_leaf': Name of the image with the leaf sprite to use in-game. The image should be in Game_data/Graphics, and the extension of the file name must be included. *'top_bud': Same as top_leaf, but for a bud. *'top_flower': Same as top_leaf, but for a flower. In addition to those, you may also specify the following, although they are optional: *'can_carry_tools': True if the Pikmin can carry tools. *'carry_strength': The Pikmin is worth this much for carrying strength. Default is 1. *'has_onion': true if the Pikmin has an Onion, false otherwise (e.g. White Pikmin). Default is true. *'sprout_evolution_time_1': How long a leaf Pikmin sprout must wait before they turn into a bud. 0 means it will never evolve into the next stage. *'sprout_evolution_time_2': Same as the previous, but between a bud and a flower. *'sprout_evolution_time_3': Same as the previous, but between a flower and the process of withering back into a leaf. *'throw_strength_mult': The strength of the throw arc will be multiplied by this. A standard Pikmin has this set to 1. For reference, a Yellow Pikmin has this set to 1.1. If you want your Pikmin to be resistant to a certain hazard, you'll want to use the vulnerabilities attributes. Another thing to note when making Pikmin is that the movement speed attribute indicates the movement speed of a leaf Pikmin. Bud Pikmin move 110% faster, and flowers move 120% faster. Animations A Pikmin type needs to have the following animations: *'attacking': Reeling back its head and smacking with it. *'carrying': Carrying an object. *'drinking': Bending down to drink a drop. *'grabbing': Standing upright and grabbing onto an object. *'lying': Knocked down to the ground by an attack, staying there for a bit, and getting back up. *'plucking': Coming out of the ground. *'sighing': Sighing after becoming disappointed with something, like being unable to reach a carrying spot. *'sprout': Idling underground; only the stem is visible. *'thrown': Twirling in the air after being thrown. *'walking': Walking. Script A Pikmin type's script cannot be changed. Object spawn script variables When a Pikmin type object is spawned, it will read the following script variables, if they're present: *'maturity': The Pikmin's maturity. 0 is leaf, 1 is bud, and 2 is flower. *'sprout': If true, the Pikmin spawns as a sprout. Otherwise, it spawns as an idle Pikmin. Besides that, there are the global spawn script variables. Category:Pikifen